package com.wkbb.common.enums;

/**
 * @author luowenyan
 * 来源(1自营 2智慧校园 3企业微信)
 */
public enum OriginTypeEnum {

    SELF_SUPPORT(1,"自营"),
    SMART_ORG(2,"智慧校园"),
    CORP_ORG(3,"企业微信"),
    VISIT_ORG(4,"访客系统");

    private OriginTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private Integer value;

    private String desc;

    public Integer getValue() {
        return this.value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(Integer value) {
        for (OriginTypeEnum originType : OriginTypeEnum.values()) {
            if (originType.getValue().intValue()==value) {
                return originType.getDesc();
            }
        }
        return null;
    }
}
